package Eyjafjalla.card.dolly;

import Eyjafjalla.card.AbstractEyjafjallaCard;
import Eyjafjalla.modcore.ColorEnum;
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction;
import com.megacrit.cardcrawl.actions.common.GainBlockAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.localization.CardStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.powers.BufferPower;
import com.megacrit.cardcrawl.powers.DexterityPower;
import com.megacrit.cardcrawl.powers.StrengthPower;
import com.megacrit.cardcrawl.powers.watcher.FreeAttackPower;
import com.megacrit.cardcrawl.powers.watcher.VigorPower;

public class DGDGZ_Eyjafjalla extends AbstractEyjafjallaCard {
    public static final String ID = "DGDGZ_Eyjafjalla";
    private static final CardStrings cardStrings;

    public DGDGZ_Eyjafjalla(){
        super(ID, cardStrings.NAME,2,cardStrings.DESCRIPTION,CardType.SKILL, ColorEnum.Eyjafjalla_Dolly_COLOR,CardRarity.RARE,CardTarget.NONE);
        this.baseMagicNumber = 1;
        this.magicNumber = 1;
        setDolly();
        setFireDescription(cardStrings.EXTENDED_DESCRIPTION[0]);
    }

    @Override
    public AbstractCard makeCopy() {
        return new DGDGZ_Eyjafjalla();
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {
        addToBot(new ApplyPowerAction(p,p,new BufferPower(p,magicNumber),magicNumber));
        addToBot(new ApplyPowerAction(p,p,new StrengthPower(p,2),2));
        if(isFire()){
            addToBot(new ApplyPowerAction(p,p,new DexterityPower(p,2),2));
        }
    }

    @Override
    public void upgrade() {
        if(!this.upgraded){
            upgradeName();
            upgradeMagicNumber(1);
        }
    }

    static {
        cardStrings = CardCrawlGame.languagePack.getCardStrings(ID);
    }
}



